<?php if(isset($_SESSION['user'])){?>
<?php $header=$this->action('Application\Controller\IndexController', 'headerAction',array('20','10'));
	  $baseUrl = $header->headerarray['baseUrl'];
	  $basePath = $header->headerarray['basePath'];
?>
	<div class="container">
		<div class="well">
			<div class="inner_title">
			<h3>Edit Order Status</h3>
			</div>
			<form class="form-horizontal" id="edit_order" name="edit_order" method="POST">
				<div class="control-group">
						<label class="control-label" for="inputUserName">User Name</label>
					<div class="controls">
						<input type="text" id="inputUserName" name="inputUserName" placeholder="User Name" value="<? if(isset($this->userinfo_orders_view->user_name) && $this->userinfo_orders_view->user_name!=""){echo $this->userinfo_orders_view->user_name;}else{}?>" readonly>
					</div>
				</div>
				<div class="control-group">
						<label class="control-label" for="inputUserName">User Email</label>
					<div class="controls">
						<input type="text" id="inputEmail" name="inputEmail" placeholder="User Email" value="<? if(isset($this->orderdeatails->guest_email) && $this->orderdeatails->guest_email!=""){echo $this->orderdeatails->guest_email;}else{}?>" readonly>
					</div>
				</div>
				<div class="control-group">
						<label class="control-label" for="inputPhone">Phone Number</label>
					<div class="controls">
						<input type="text" id="phoneNumber" name="phoneNumber" placeholder="phoneNumber" value="<? if(isset($this->orderdeatails->guest_phone_number) && $this->orderdeatails->guest_phone_number!=""){echo $this->orderdeatails->guest_phone_number;}else{}?>" readonly>
					</div>
				</div>
				<div class="control-group">
						<label class="control-label" for="address">Address</label>
					<div class="controls">
						<textarea  id="address" name="address" placeholder="Address" readonly><? if(isset($this->userinfo_orders_view->address) && $this->userinfo_orders_view->address!=""){echo $this->userinfo_orders_view->address;}else{}?></textarea>
					</div>
				</div>
				<div class="control-group">
						<label class="control-label" for="totalAmount">Total Amount</label>
					<div class="controls">
						<input type="text" id="totalAmount" name="totalAmount" placeholder="Total Amount" value="<? if(isset($this->orderdeatails->tot_amount) && $this->orderdeatails->tot_amount!=""){echo $this->orderdeatails->tot_amount;}else{}?>" readonly>
					</div>
				</div>
				<div class="control-group">
						<label class="control-label" for="paidAmount">Due Amount</label>
					<div class="controls">
						<input type="text" id="due_amount" name="due_amount" placeholder="Paid Amount" readonly="readOnly" value="<? if(isset($this->orderdeatails->amount_paid) && $this->orderdeatails->amount_paid!=""){echo $this->orderdeatails->amount_paid;}else{}?>">
					</div>
				</div>
				<div class="control-group">
						<label class="control-label" for="paidAmount">Paid Amount</label>
					<div class="controls">
						<input type="text" id="paidAmount" name="paidAmount" placeholder="Paid Amount" value="">
					</div>
				</div>
				<div class="control-group">
						<label class="control-label" for="paymentStatus">Payment Status</label>
					<div class="controls">
						<select id="paymentStatus" name="paymentStatus">
							<option value="">select</option>
							<? if(isset($this->orderdeatails->payment_status)){
							if($this->orderdeatails->payment_status=='pending'){?>
							<option value="<? if(isset($this->orderdeatails->payment_status) && $this->orderdeatails->payment_status!=""){echo $this->orderdeatails->payment_status;}else{}?>" selected>Pending</option>
							<?}else{?>
							<option value="pending" selected>Pending</option>
							<? }?>
							<? if($this->orderdeatails->payment_status=='completed'){?>
							<option value="<? if(isset($this->orderdeatails->payment_status) && $this->orderdeatails->payment_status!=""){echo $this->orderdeatails->payment_status;}else{}?>" selected>Completed</option>
							<?}else{?>
							<option value="completed">Completed</option>
							<? }}?>
						</select>	
					</div>
				</div>
				<div class="control-group">
					<div class="controls">
						<a class="back_btn" href="<? echo $baseUrl.'users/offline-order'?>">Back</a>&nbsp;&nbsp;&nbsp;&nbsp;<button type="button" class="clf_btn" onClick="return updateFrencseeOrderStatus();">Save</button>
					</div>
				</div>
				<input type="hidden" id="hid_order_id" name="hid_order_id" value="<? if(isset($this->orderdeatails->ads_order_id) && $this->orderdeatails->ads_order_id!=""){echo $this->orderdeatails->ads_order_id;}else{}?>">
			</form>
		</div>
	</div>
<?php }else{?>
<script>
	window.location=BASE_URL;
</script>
<?php } ?>